<script type="text/javascript">
    setTimeout(function(){
        jQuery(".chzn-select").chosen();
    },1);
</script>
<div class="breadcrumbwidget">
	<ul class="skins">
        <li><a href="default" class="skin-color default"></a></li>
        <li><a href="orange" class="skin-color orange"></a></li>
        <li>&nbsp;</li>
        <li class="fixed"><a href="" class="skin-layout fixed"></a></li>
        <li class="wide"><a href="" class="skin-layout wide"></a></li>
    </ul><!--skins-->
	<ul class="breadcrumb">
        <li><a href="<?php echo $baseurl?>">Trang chủ</a> <span class="divider">/</span></li>
        <li style="width: 93px;" class="active">Sửa đặt bàn</li>
    </ul>
</div><!--breadcrumbwidget-->
<div class="pagetitle">
	<h1>Sửa đặt bàn</h1> <span></span>
</div>
<div class="maincontent">
    <?php if(validation_errors()):?>
        <div class="alert alert-error" style="margin: 10px 10px 10px 40px;">
          <button data-dismiss="alert" class="close" type="button">×</button>
          <?php echo validation_errors(); ?>
        </div>
    <?php endif;?>
    <div class="contentinner content-dashboard">    
    <?php $attr = array('class' => 'stdform'); echo form_open('', $attr)?>
    
    <br>
	<p id="content">
		<p>
			<label style="margin-left: -11px;">Chọn nhà hàng</label>
			<span class="field">
				<select name="restaurant_id" class="uniformselect">
					<?php echo $optionRestaurant;?>
				</select>
			</span>
		</p>
		<p>
			<label>Chọn địa chỉ</label>
			<span class="field">
				<select name="address_id" class="uniformselect">
					<?php echo $optionAddress;?>
				</select>
			</span>
		</p>
		 <p>
			<label>Họ tên</label>
			<span class="field"><input type="text" value="<?php echo $getBookingInfo->name ? $getBookingInfo->name : '';?>" name="name" class="input-xxlarge" placeholder="Họ tên..." /></span>
		</p>
		<p>
			<label>Điện thoại</label>
			<span class="field"><input type="text" value="<?php echo $getBookingInfo->phone ? $getBookingInfo->phone : '';?>" name="phone" class="input-xxlarge" placeholder="Điện thoại..." /></span>
		</p>
		<?php //die(print_r($getBookingInfo));?>
		<p>
			<label>Email</label>
			<span class="field"><input type="text" value="<?php echo $getBookingInfo->email ? $getBookingInfo->email : '';?>" name="email" class="input-xxlarge" placeholder="Số người..." /></span>
		</p>
		<?php 
			$time_booking = $getBookingInfo->time_booking;
			$arr = explode("|",$time_booking);
			//print_r (explode("|",$time_booking));
			//die($arr);
			$gio_dat = $arr[0];
			$ngay_dat = $arr[1]; //$arr_ngay_dat = explode("/",$ngay_dat); $ngay_dat = $arr_ngay_dat[1]."/".$arr_ngay_dat[0]."/".$arr_ngay_dat[2];
		?>
		<p>
			<label>Ngày đặt <?php //echo $time_booking;?></label>
			<span class="field"><input id="datepicker" type="text" name="dates" value="<?php echo $ngay_dat ? $ngay_dat : 'Chưa rõ';?>" />
				<script> jQuery( "#datepicker" ).datepicker();</script>
			</span>
		</p>
		<p>
			<label>Giờ đặt <?php //echo $gio_dat;?></label>
            <span class="field"><input type="text" value="<?php echo $gio_dat ? $gio_dat : '';?>" name="hours" class="input-xxlarge" placeholder="Giờ đặt..." /></span>
		</p>
		<p>
			<label>Số người</label>
			<span class="field"><input type="text" value="<?php echo $getBookingInfo->peoples ? $getBookingInfo->peoples : '';?>" name="peoples" class="input-xxlarge" placeholder="Số người..." /></span>
		</p>
		<p>
			<label>Yêu cầu</label>
			<span class="field"><textarea id="autoResizeTA" name="required" cols="80" rows="5" class="span5" style="resize: vertical; height: 100px; margin-top: 0px; margin-bottom: 0px;"><?php echo $getBookingInfo->required ?></textarea></span> 
		</p>
	 <p>
		<label>Phê duyệt</label>
		<span class="formwrapper">
			<span class=""><input type="checkbox" name="improved" style="opacity: 1;" <?php if( $getBookingInfo->improved == 1 ){ echo 'checked="" value="1"'; }?>"></span>
		</span>
	</p>
    <p>
        <label></label>
        <button class="btn btn-rounded" type="submit"> <i class="iconfa-ok"></i> &nbsp; Lưu lại</button>
        <button class="btn btn-rounded" type="button" onclick="window.location='<?php echo $baseurl.'manage/booking/index'?>'"> <i class="icon-arrow-right"></i> &nbsp; Hủy bỏ</button>
    </p>
    </form>
    </div>
</div>
